{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 一、信号\n",
    "\n",
    "1. 信号的分类\n",
    "    1. 确定信号与随机信号\n",
    "        - 确定信号分析是基础，噪声+确定信号得到随机信号\n",
    "    1. 连续信号与离散信号\n",
    "        - 时间离散信号，也称作离散时间序列。离散状态和连续状态的性质有很多差别（类比微分和差分、积分与和分）。\n",
    "    1. 周期信号的判别与周期 $T$ 的计算\n",
    "1. 阶跃函数与冲激函数\n",
    "1. 信号的运算：混合运算时的绘图常用端点连线法\n",
    "    1. 时移\n",
    "    1. 反转\n",
    "    1. 尺度变换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2. 周期信号的判别与周期 $T$ 的计算\n",
    "\n",
    ">$T$ 一般取最小正周期，也称作基波周期$T_0$\n",
    "\n",
    "#### 1. 连续信号：$T$ 为任意正数，例如 $sin(t)$\n",
    "\n",
    "**多个周期信号之和的周期性：$f_1(x)$ 的周期为 $T_1$，$f_2(x)$ 的周期为 $T_2$，问 $f_1(x) + f_2(x)$ 的周期性**\n",
    "\n",
    "如果 $T_1$ 与 $T_2$ 有公倍数 $S$（整数），那么 $f_1(x) + f_2(x)$ 就是周期信号，其基波周期为 $T_1$ 与 $T_2$ 的最小公倍数。\n",
    "\n",
    "**该条件成立的前提是：$T_1 \\over T_2$ 为有理数.**\n",
    "\n",
    "这是个数学问题，用反证法。先假设 $T_1 \\over T_2$ 为无理数且有公倍数，就有该公倍数 $n T_1 = m T_2$，于是$\\frac{m}{n} = \\frac{T_1}{T_2}$，$\\frac{m}{n}$ 为有理数，它和无理数$\\frac{T_1}{T_2}$显然不可能相等，矛盾，得证。\n",
    "\n",
    "\n",
    "\n",
    "#### 2. 离散序列：$T$ 必须为正整数，例如 $sin[\\pi n]$\n",
    "\n",
    "离散序列的周期只可能是整数，这个没啥好讲的。\n",
    "\n",
    "需要注意的是，周期为无理数的连续信号离散化后，会变成非周期的。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. 阶跃函数与冲激函数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.1 连续时间信号\n",
    "\n",
    "#### 3.1.1 阶跃函数（Heaviside Step Function） $u(t)$\n",
    "\n",
    "$$\\begin{equation}\n",
    "u(t)=\n",
    "\\begin{cases}\n",
    "0, & t<0\\\\\n",
    "1, & t>0\n",
    "\\end{cases}\n",
    "\\end{equation}$$\n",
    "\n",
    "注意：有的书会定义 $t=0$ 时 $u(t)=1/2$，这是从极限近似法得到的（形象但不严谨）。在本书中该点的值没有意义，只需要知道 $u(t)$ 在该点不连续。\n",
    "\n",
    "#### 3.1.2 冲激函数（Dirac Function） $\\delta(t)$\n",
    "\n",
    "阶跃信号在零点值从 0 跃升到 1. 我们定义冲激函数 $\\delta(t)=\\frac{d u(t)}{d t}$，用极限近似法可得冲激函数的狄拉克定义：\n",
    "\n",
    "$$\n",
    "\\begin{cases}\n",
    "\\delta(t) = 0, & t\\neq 0\\\\\n",
    "\\int_{-\\infty}^\\infty \\delta(t)\\ \\mathrm{d}t = 1\n",
    "\\end{cases}\n",
    "$$\n",
    "\n",
    "严谨的定义使用了广义函数，这里就不展开了。\n",
    "\n",
    "#### 3.1.3 冲激函数的性质\n",
    "\n",
    "1. 它的不定积分为阶跃函数：$\\int_{-\\infty}^{t} \\delta(t)\\ dt = u(t)$\n",
    "1. 是偶函数：$\\delta(t) = \\delta(-t)$，利用广义函数理论证明\n",
    "1. $\\delta(\\alpha t) = \\frac{1}{|\\alpha|}\\delta(t)$\n",
    "1. $f(t)\\delta(t) = f(0)\\delta(t)$\n",
    "\n",
    "    $f(t)\\delta(t-t_0) = f(t_0)\\delta(t-t0)$，可用广义函数理论证明\n",
    "\n",
    "1. $\\int_{-\\infty}^{\\infty} f(t)\\delta(t)\\ dt = f(0)$，可利用上式4证明\n",
    "\n",
    "    $\\int_{-\\infty}^{\\infty} f(t)\\delta(t-t_0)\\ dt = f(t_0)$\n",
    "\n",
    "#### 3.1.4 冲击偶函数 $\\delta'(t)$ 的性质\n",
    "\n",
    "1. $f(t)\\delta'(t) = f(0)\\delta'(t) - f'(0)\\delta(t)$，利用了$(uv)' = u'v + uv'$\n",
    "1. $\\int_{-\\infty}^{\\infty} f(t)\\delta'(t)\\ dt = -f'(0)$，利用上式可证（分部积分）\n",
    "\n",
    "    $\\int_{-\\infty}^{\\infty} f(t)\\delta^{(n)}(t)\\ dt = (-1)^{(n)}f^{(n)}(0)$\n",
    "\n",
    "1. $\\delta'(\\alpha t) = \\frac{1}{|\\alpha|}\\frac{1}{\\alpha}\\delta(t)$\n",
    "\n",
    "    $\\delta^{(n)}(\\alpha t) = \\frac{1}{|\\alpha|}\\frac{1}{\\alpha^{(n)}}\\delta^{(n)}(t)$\n",
    "\n",
    "#### 3.1.5 其他性质\n",
    "\n",
    "1. 复合函数：$\\delta[f(t)] = \\sum_{i=1}^n \\frac{1}{|f'(t_i)|}\\delta(t-t_i)$，其中 $t_i$ 的集合为 $f(t)=0$ 的所有根"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.2 离散时间信号\n",
    "\n",
    "#### 3.2.1 单位脉冲\n",
    "\n",
    "$$\n",
    "\\begin{equation}\n",
    "\\delta[n]=\n",
    "\\begin{cases}\n",
    "1, & n=0\\\\\n",
    "0, & n \\neq 0\n",
    "\\end{cases}\n",
    "\\end{equation}\n",
    "$$\n",
    "\n",
    "冲激函数的离散形式就是单位脉冲，它的性质和定义都要比冲激函数简单得多，下面只列举几个和冲激函数不同的性质\n",
    "\n",
    "1. $\\delta[\\alpha n] = \\delta[n]$，这个差别最明显\n",
    "1. $\\delta[n] = u[n] - u[n-1]$，连续时是微分 $\\delta(t)=\\frac{d u(t)}{d t}$，这里是差分\n",
    "1. $u[n] = \\sum_{i=-\\infty}^n \\delta[i]$，连续时是积分$\\int_{-\\infty}^{t} \\delta(t)\\ dt = u(t)$，这里是和分"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
